Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Example] Display admin login status on the website #59

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexander-schranz
Copy link
Member

@alexander-schranz alexander-schranz commented Apr 2, 2020

What's in this PR?

Add website admin toolbar example. It will display just the login state of the current user but can be used for more:

Bildschirmfoto 2020-04-03 um 10 38 05

Why?

Sometimes you want to display things on the website for users which are loggedin in the admin.

@alexander-schranz alexander-schranz changed the title WIP: Add website admin toolbar example WIP: Add admin toolbar example to website Apr 2, 2020
@alexander-schranz alexander-schranz changed the title WIP: Add admin toolbar example to website [Example] Add admin toolbar example to website Apr 3, 2020
@alexander-schranz alexander-schranz added the Example Example implementations label Apr 3, 2020
@sulu sulu deleted a comment from alexander-schranz Apr 3, 2020
@niklasnatter niklasnatter changed the title [Example] Add admin toolbar example to website [Example] Display admin login status on the website Sep 29, 2020
@@ -46,6 +46,8 @@
{% endblock %}
</footer>

{{ render_hinclude('/admin/website-toolbar') }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its very important to use here hinclude or any other ajax request to render the html. You can not use here include or the normal render function as the Website does know nothing about the Admin and so you can not do any security checks for the admin users here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Example Example implementations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant